﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Text;

namespace duia.Canteenpay.ViewModel
{
    /// <summary>
    /// 数据返回模型基类
    /// </summary>
    public class ApiResult
    {
        /// <summary>
        /// 返回状态码
        /// </summary>
        public virtual HttpStatusCode HttpStatus { get; set; } = HttpStatusCode.OK;

        /// <summary>
        /// 返回数据
        /// </summary>
        public virtual object Data { get; set; }

        /// <summary>
        /// 获取 消息内容
        /// </summary>
        public virtual string Message { get; set; }

        /// <summary>
        /// 执行时长
        /// </summary>
        public virtual long TimeOut { get; set; }


    }

    /// <summary>
    /// 数据返回模型基类
    /// </summary>
    public class ApiResult<T> : ApiResult
    {
        /// <summary>
        /// 返回类型
        /// </summary>
        public new T Data { get; set; }

    }
}
